import 'package:flutter/cupertino.dart';
import 'package:flutter/widgets.dart';

class Test15 extends StatefulWidget {
  @override
  _Test15State createState() => _Test15State();
}

class _Test15State extends State<Test15> {
  bool check = false;

  @override
  Widget build(BuildContext context) {
    return Container(
      child: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: [
            CupertinoSwitch(
                value: check,
                onChanged: (value) {
                  setState(() {
                    check = value;
                  });
                })
          ],
        ),
      ),
    );
  }
}
